﻿CREATE TABLE [stg].[Invoice] (
    [InvoiceCode]       INT             NOT NULL,
    [CustomerCode]      INT             NOT NULL,
    [InvoiceDate]       DATETIME        NOT NULL,
    [BillingAddress]    NVARCHAR (70)   NULL,
    [BillingCity]       NVARCHAR (40)   NULL,
    [BillingState]      NVARCHAR (40)   NULL,
    [BillingCountry]    NVARCHAR (40)   NULL,
    [BillingPostalCode] NVARCHAR (10)   NULL,
    [Total]             NUMERIC (10, 2) NOT NULL,
    [TaskExecutionLogId] INT NOT NULL DEFAULT 0, 
    CONSTRAINT [PK_Invoice] PRIMARY KEY CLUSTERED ([InvoiceCode] ASC)
   
);

